<div [formGroup]="group"
     [ngClass]="['ng-dynamic-forms-'+model.type.toLowerCase(), getClass('element', 'container'), getClass('grid', 'container')]">

    <div *ngIf="!isCheckbox && hasLabel" [ngClass]="getClass('grid', 'label')">

        <label [for]="id" [innerHTML]="model.label" [ngClass]="getClass('element', 'label')"></label>

    </div>

    <ng-container *ngTemplateOutlet="startTemplate?.templateRef; context: model"></ng-container>

    <ng-container #componentViewContainer></ng-container>

    <ul *ngIf="showErrorMessages" [ngClass]="[getClass('element', 'errors'), getClass('grid', 'errors')]">
        <li *ngFor="let message of errorMessages" class="ui-message ui-messages-error ui-corner-all">{{ message }}</li>
    </ul>

    <ng-container *ngTemplateOutlet="endTemplate?.templateRef; context: model"></ng-container>

    <ng-content></ng-content>

</div>
